package com.xxl.job.executor.feign;

import com.xxl.job.core.biz.model.ReturnT;
import feign.Headers;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(name = "${xxl.job.admin.addresses:http://saas-xxl-job-admin/xxl-job-admin}",configuration = FeignConfiguration.class)//填写配置的server name
public interface ProvideClient {

    @RequestMapping(value = "/api/registry",method = RequestMethod.POST)
    // @Headers( {"XXL-JOB-ACCESS-TOKEN:${xxl.job.accessToken}"})
    ReturnT<String> registry(String data);

    @RequestMapping(value = "/api/callback",method = RequestMethod.POST)
    ReturnT<String> callback(String data);

    @RequestMapping(value = "/api/registryRemove",method = RequestMethod.POST)
    ReturnT<String> registryRemove(String data);

}
